package com.zhangshanfeng.test2;

import java.util.concurrent.ArrayBlockingQueue;

public class Cooker extends Thread {
    private ArrayBlockingQueue<String> bd;

    public Cooker(ArrayBlockingQueue<String> bd) {
        this.bd = bd;
    }

    @Override
    public void run() {

        while(true){
            try {
                bd.put("热狗");
                System.out.println("制作了一个热狗");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }


        }


    }
}
